<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>FIRST</title>
		<style type="text/css">
			*{
				padding: 0;
				margin: 0;
			}
			.container{
				width: 100vw;
				height: 100vh;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		canvas{
			width: 400px;
			height: 400px;
			border: 10px solid #333333;
		}	
		
		</style>
	</head>
	<body>
		<div class="container">
		<canvas id="canvas" width="500" height="500"></canvas>
		</div>
	</body>
	<script>
		window.onload = function() {
			
			let oCanvas = document.getElementById('canvas');
		
			console.dir(oCanvas);
			
			let oPen=oCanvas.getContext("2d");
			
			//开始点坐标/结束点坐标
			//createLinearGradient(x1,y1,x2,y2)
			//addColorStop(value1,color1)
			//addColorStop(value2,color2)
			
//			var oJb = oPen.createLinearGradient(0,0,500,0);
//			oJb.addColorStop(0.1,"red");
//			oJb.addColorStop(1,"blue");
//			oPen.fillStyle = oJb;
			
//			oPen.fillRect(0,0,500,500);
			
//			oPen.font = "100px bold";
//			oPen.fillText("左边无脑",100,100)
           
//          oPen.arc(250,250,200,0,360*Math.PI);
//          oPen.fill();

            //开始渐变点的坐标，半径,渐变结束时圆心的坐标，结束时的半径
            //creatRadialGrandient(x1,y1,r,x2,y2,r2);
            
//          var oJb = oPen.createRadialGradient(100,60,10,80,80,50);
//          oJb.addColorStop(0,"white");
//          oJb.addColorStop(0.9,"green");
//          oJb.addColorStop(1,"orange");
//          oPen.fillStyle = oJb;
//          oPen.arc(80,80,50,0,Math.PI/180*360,true);
//          oPen.fill();

            //偏移方向
            //shadowOffsetX/shadowOffsetY
            //阴影的颜色
            //shadowColor
            //模糊程度，越大越模糊
            //shadowBlur
            
//          oPen.shadowBlur = 50;
//          oPen.shadowOffsetX = 0;
//          oPen.shadowOffsetY = 0;
//          oPen.shadowColor = "cadetblue";
//          
//          oPen.fillRect(100,100,100,100);
//          
//          oPen.font = "100px bold";
//			oPen.fillText("左边无脑",100,100)
            
            
		}	
	</script>
</html>
